package system.controller;

import common.controller.base.BaseController;
import common.model.request.ForgetPasswordRequest;
import common.model.response.base.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import system.service.ForgetPasswordService;

import javax.annotation.Resource;

/**
 * 忘记密码
 *
 * @author 米泽鹏
 * @since 2023-11-06
 */
@Api(tags = "忘记密码")
@RestController
@RequestMapping("/system/forget-password")
public class ForgetPasswordController extends BaseController {

	@Resource
	private ForgetPasswordService forgetPasswordService;

	@ApiOperation(value = "忘记密码", notes = "忘记密码")
	@PostMapping("/forgetPassword")
	public Result<?> forgetPassword(@ApiParam(value = "忘记密码请求", required = true) @RequestBody @Validated ForgetPasswordRequest request) {
		return forgetPasswordService.forgetPassword(request);
	}

}
